package ch04.Normalized;

import ch04.homoAST.Token;

public class Test {
    public static void main(String[] args) {
        Token plus = new Token(Token.PLUS, "+");
        Token one = new Token(Token.INT, "1");
        Token two = new Token(Token.INT, "2");

        // 分别是 操作数1， 操作符，操作数2
        ExprNode root = new AddNode(new IntNode(one), plus, new IntNode(two));
        System.out.println(root.getEvalType());
        System.out.println(root.toStringTree());
    }
}
